//类型默认先全写any

//引入二次封装的request
import request from "@/utils/request";

//获取头部内容和简介
export const reqHeader = (id:any)=>request.get<any>(`https://m.ximalaya.com/m-revision/page/album/v2/queryAlbumPage/${id}`)

//获取节目内容
export const reqProgram = ({albumId,page,pageSize,asc,countKeys,v}:any)=>request.get<any>(`https://m.ximalaya.com/m-revision/common/album/queryAlbumTrackRecordsByPage?albumId=${albumId}&page=${page}&pageSize=${pageSize}&asc=${asc}&countKeys=${countKeys}&v=${v}`)

//获取主播信息
export const reqPerson = (anchorId:any)=>request.get<any>(`https://m.ximalaya.com/m-revision/common/user/queryUserInfo/${anchorId}?userCountKeys=follower`)

//获取往期作品
export const reqWorks = ({anchorId,page,pageSize,asc}:any)=>request.get<any>(`https://m.ximalaya.com/m-revision/common/anchor/queryAnchorAlbumsByPage?anchorId=${anchorId}&page=${page}&pageSize=${pageSize}&asc=${asc}`)

//获取往期评论
export const reqComment = ({albumId,page,pageSize}:any)=>request.get<any>(`https://m.ximalaya.com/m-revision/common/album/queryAlbumCommentsByPage?page=${page}&pageSize=${pageSize}&albumId=${albumId}&v=${Math.random()}`)

//获取相似专辑
export const reqLike = ({kw,page,rows,device,condition,spellchecker,core}:any)=>request.get(`/revision/search/seo?kw=${kw}&page=${page}&rows=${rows}&device=${device}&condition=${condition}&spellchecker=${spellchecker}&core=${core}`)

//获取猜你喜欢
export const reqLove = ({pageNum,pageSize,sort}:any)=>request.get(`/revision/category/v2/albums?pageNum=${pageNum}&pageSize=${pageSize}&sort=${sort}`)